import QtQuick 2.0

Image {
    id: bg
    opacity: 0.0
    visible: opacity !== 0.0

    signal hidefinish()
    signal showfinish()

    function show()
    {
        bg.opacity = 1.0
    }

    function hide()
    {
        bg.opacity = 0.0
        hidefinish()
    }

    onOpacityChanged: {
        if(opacity === 1.0)
        {
            showfinish()
        }
    }

    Behavior on opacity {
        NumberAnimation{ duration: 300; }
    }
}
